<%@page import="mks.webshop.entity.PanelType"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/include.jsp"%>
<div id="content-block">

	<div id="block-views-uc_products_frontpage-block_1"
		class="block block-views">
		<div class="content">
			<img height="242" width="567" src="images/slogan.jpg" alt="" />
			<div
				class="view view-uc-products-frontpage view-id-uc_products_frontpage view-display-id-block_1 view-dom-id-11">
				<div id="view-content" class="view-content">
					<h1>Sản phẩm mới nhất</h1>
					<table>
						<tr>
							<td><c:forEach var="pro" items="${proList}">
									<div
										class="views-row views-row-1 views-row-odd views-row-first">

										<div class="views-field-title">
											<span class="field-content"><a
												href="detailproduct.html?id=${pro.id}">${pro.name}</a></span>
										</div>

										<div class="views-field-sell-price">
											<label class="views-label-sell-price"> Giá bán: </label> <span
												class="field-content"> <span name="uc_price_name"
												class="uc-price-product uc-price-sell_price uc-price">${pro.newPrice}</span>/${pro.unit}
											</span>
										</div>

										<div class="views-field-field-image-cache-fid">
											<div class="field-content">
												<a href="detailproduct.html?id=${pro.id}"><a
													href="detailproduct.html?id=${pro.id}"
													class="imagecache imagecache-product_list imagecache-linked imagecache-product_list_linked"><img
														src="/display.html?imageKey=${pro.imageKey}" alt=""
														title="${pro.name}"
														class="imagecache imagecache-product_list" width="100"
														height="70" /></a></a>
											</div>
										</div>

										<div class="views-field-teaser">
											<div class="field-content">
												<p>${pro.info}</p>
											</div>
										</div>
										<c:choose>
										   <c:when test="${pro.quantity > 0}">
												<div class="views-field-addtocartlink">
													<label class="views-label-field-packaging-standard-value" style="display: inline;">Số lượng: </label>
													<form action="/booking.html" method="post">
														<input type="hidden" name="code" value="${pro.id}" />
														<input type="hidden" name="page" value="home" />
														<input type="number" maxlength="3" name="quantity" id="quantity" size="3" value="1" class="form-text" min="1" max="${pro.quantity}">												
														<div class="field-content" style="padding-left: 33px; display: inline;">
															<input type="image" src="/images/sp_cart.jpg" name="submit"	class="states">
														</div>
											</form>
												</div>
											</c:when> 
										   
										   <c:otherwise>
										   		<div class=field-content>
													<img src="./images/sold_out.png" width=100 height=50>
												</div>
										   </c:otherwise>    
										</c:choose>


										<div class="views-field-ops">
											<span class="field-content"></span>
										</div>
									</div>
								</c:forEach></td>
						</tr>
					</table>
				</div>
				<div style="margin: auto; padding-left: 25px; width: 305px;">

					<button id="more_product"
						style="background: #ff9726; width: 305px; border: 0.5px soild;">
						<p style="font-size: 20px; color: #ffffff;">Xem thêm sản phẩm</p>
					</button>

				</div>
				<div class="item-list"></div>
			</div>
		</div>
	</div>
</div>

<div style="clear: both; margin-top: 10px"></div>
